public class Incident{
	
	private int number;
	private String description;
	private String mode;
	private String cause;
	private String effect;
	private String currentControl;
	private int probOcc;
	private int severity;
	private int probDet;
	private int rpn;
	//new fields
	private String recActions;
	private String responsibility;
	private String targetDate;
	private String actionTaken;
	private int newProbOcc;
	private int newSeverity;
	private int newProbDet;
	private int newRpn;
	
	
	public Incident(){
		
		description = null;
		mode = null;
		cause = null;
		effect = null;
		setCurrentControl(null);
		probOcc = 0;
		severity = 0;
		probDet = 0;
		rpn = 0;
		//new fields
		recActions = null;
		responsibility = null;
		targetDate = null;
		actionTaken = null;
		newProbOcc = 0;
		newSeverity = 0;
		newProbDet = 0;
		newRpn = 0;
		
	}
	
	
	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getMode() {
		return mode;
	}

	public void setMode(String mode) {
		this.mode = mode;
	}

	public String getCause() {
		return cause;
	}

	public void setCause(String cause) {
		this.cause = cause;
	}

	public String getEffect() {
		return effect;
	}

	public void setEffect(String effect) {
		this.effect = effect;
	}

	public int getProbOcc() {
		return probOcc;
	}

	public void setProbOcc(int inputLine) {
		this.probOcc = inputLine;
	}

	public int getSeverity() {
		return severity;
	}

	public void setSeverity(int severity) {
		this.severity = severity;
	}

	public int getProbDet() {
		return probDet;
	}

	public void setProbDet(int probDet) {
		this.probDet = probDet;
	}
	
	public void calculateRPN(){
		this.rpn = probOcc * severity * probDet;
	}
	
	public void calculateNewRPN(){
		this.newRpn = newProbOcc * newSeverity * newProbDet;
	}
	
	public String toString(){
		
		return "Incident Description: "+ description + "\n" + "Incident Mode: "+ mode + "\n"
			   + "Incident Cause: " + cause + "\n" + "Incident Effect: " + effect + "\n" 
			   + "Incident Current Control: " + currentControl + "\n"
			   + "Incident Probability of Occurence: "+ probOcc + "\n"
			   + "Incident Severity: " + severity + "\n"
			   + "Incident Probability of Detection: " + probDet + "\n"
			   + "Incident RPN: " + rpn;
	}

	public String fullToString(){
		
		return "Incident Description: "+ description + "\n" + "Incident Mode: "+ mode + "\n"
			   + "Incident Cause: " + cause + "\n" + "Incident Effect: " + effect + "\n" 
			   + "Incident Current Control: " + currentControl + "\n"
			   + "Incident OldProbability Occurence: "+ probOcc + "\n"
			   + "Incident Old Severity: " + severity + "\n"
			   + "Incident Old Probability Detection: " + probDet + "\n"
			   + "Incident Old RPN: " + rpn +"\n"
			   + "Incident Recommended Actions: " + recActions + "\n"
			   + "Incident Responsibility: " + responsibility + "\n"
			   + "Incident Target Date: " + targetDate + "\n"
			   + "Incident Action Taken: " + actionTaken + "\n"
			   + "Incident New Probability of Occurrence: " + newProbOcc + "\n"
			   + "Incident New Severity: " + newSeverity + "\n"
			   + "Incident New Probability of Detection: " + newProbDet + "\n"
			   + "Incident New RPN: "+ newRpn;
	}
	
	public int getRpn() {
		return rpn;
	}

	public void setRpn(int rpn) {
		this.rpn = rpn;
	}
	
	public int getNumber() {
		return number;
	}

	public void setNumber(int incidentsCounter) {
		this.number = incidentsCounter;
	}
	
	public String getRecActions() {
		return recActions;
	}

	public void setRecActions(String recActions) {
		this.recActions = recActions;
	}

	public String getResponsibility() {
		return responsibility;
	}

	public void setResponsibility(String responsibility) {
		this.responsibility = responsibility;
	}

	public String getTargetDate() {
		return targetDate;
	}

	public void setTargetDate(String targetDate) {
		this.targetDate = targetDate;
	}

	public String getActionTaken() {
		return actionTaken;
	}

	public void setActionTaken(String actionTaken) {
		this.actionTaken = actionTaken;
	}

	public int getNewProbOcc() {
		return newProbOcc;
	}

	public void setNewProbOcc(int newProbOcc) {
		this.newProbOcc = newProbOcc;
	}

	public int getNewSeverity() {
		return newSeverity;
	}

	public void setNewSeverity(int newSeverity) {
		this.newSeverity = newSeverity;
	}

	public int getNewProbDet() {
		return newProbDet;
	}

	public void setNewProbDet(int newProbDet) {
		this.newProbDet = newProbDet;
	}

	public int getNewRpn() {
		return newRpn;
	}

	public void setNewRpn(int newRpn) {
		this.newRpn = newRpn;
	}



	public String getCurrentControl() {
		return currentControl;
	}



	public void setCurrentControl(String currentControl) {
		this.currentControl = currentControl;
	}

	
}